// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import './assets/css/global.css'

//导入所有插件
import './plugins'

//导入所有API
import api from './api'
//将api绑定在Vue组件的原型链上
Vue.prototype.api = api;

//导入vuex仓库
import store from './store'

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  //这是将路由出挂载到vue根组件上，所有子组件可用this.$router来访问路由
  router,
  //将vuex的仓库挂载到vue根组件上，那么其它所有子组件都可以通过 this.$store来访问仓库
  store,
  components: { App },
  template: '<App/>'
})
